<!--
 * @Author: lixb
 * @Date: 2020-08-18 11:03:17
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2020-09-18 20:54:15
 * @Descripttion: 首页的每个模块都是单独的组件，在当前文件下的components文件下维护，根据引入路径去寻找响应组件
-->
<template>
  <div class="page-container">
    <el-row :gutter="10">
      <el-col :span="17">
        <Often></Often>
        <Calendar></Calendar>
        <GreetingCard></GreetingCard>
        <SeasonGift></SeasonGift>
        <PayStatistics></PayStatistics>
      </el-col>
      <el-col :span="7">
        <SalaryCard></SalaryCard>
        <PersonnelStatistics></PersonnelStatistics>
        <BirthdayWall></BirthdayWall>
        <JoinActivity></JoinActivity>
        <GiftBag></GiftBag>
        <WelfareSurvey></WelfareSurvey>
      </el-col>
    </el-row>
  </div>
</template>

<script>
  import Often from './components/Often.vue'; //常用功能
  import { listenClientRouteChange } from '@/plugins/clientAuth';
  import SalaryCard from './components/SalaryCard.vue'; //薪享卡模块
  import PersonnelStatistics from './components/PersonnelStatistics.vue'; //人员统计模块
  import BirthdayWall from './components/BirthdayWall.vue'; //生日墙模块
  import JoinActivity from './components/JoinActivity.vue'; //活动报名模块
  import GiftBag from './components/GiftBag.vue'; //精选福利礼包模块
  import Calendar from './components/Calendar.vue'; //日历模块
  import GreetingCard from './components/GreetingCard.vue'; //贺卡模板模块
  import SeasonGift from './components/SeasonGift.vue'; //时令礼包模块
  import PayStatistics from './components/PayStatistics.vue'; //消费统计模块
  import WelfareSurvey from './components/WelfareSurvey.vue'; //福利概况模块

  export default {
    components: {
      Often,
      SalaryCard,
      PersonnelStatistics,
      BirthdayWall,
      JoinActivity,
      GiftBag,
      Calendar,
      GreetingCard,
      SeasonGift,
      PayStatistics,
      WelfareSurvey,
    },
    data() {
      return {
        calendar: {
          show: false,
          zero: true,
          value: [], //默认日期
          lunar: true, //显示农历
          select: value => {
            this.calendar.value = value;
          },
        },
      };
    },
    activated() {},
    mounted() {
      listenClientRouteChange(path => {
        this.$router.push(path);
        location.reload();
      });
    },
    methods: {},
  };
</script>

<style lang="scss" scoped></style>
